<template>
    <div id="box2">
        <ul id="box"  @click="listClick">
            <li>
                <router-link to="/new/day/me">我的日记</router-link>
            </li>
            <li>
                <router-link to="/fans">关注的人</router-link>
            </li>
            <li><router-link to="/new/word/word">提醒</router-link></li>
            <li><router-link to="/new/setting">设置</router-link></li>
            <li id="edit" @click="exit"><button>退出登录</button></li>
        </ul>
    </div>
</template>

<script>

export default {
    methods:{
        listClick(){
            this.$store.commit("list1",false);
        },
        exit(){
            this.http.get("/users/exit")
            .then(res=>{
                this.layer.msg("退出成功");
                window.location.href="http://localhost:8080";
            })
        },
    },
}
</script>

<style scoped>
    #box{
        background-color: white;
        margin: 0;
        padding: 0;
        border-bottom: red;
    }
    #box li{
        background-color: white;
        padding: 0 10px;
        height: 40px;
        line-height: 40px;
        border-top: solid 1px #eee;
        
        color: #666;
    }
    #box li:nth-of-type(5){
        box-shadow: 1px 1px 5px #555; 
    }
    #box a{
        display: inline-block;
        width: 100%;
        height: 100%;
        color: #777;
    }
    #box button{
        width: 100%;
        height: 30px;
        border: solid 1px #ddd;
        border-radius: 4px;
        background-color: white;
        color: #777;
    }
    #box #edit{
        line-height: 45px;
        height: 50px;
    }
</style>